﻿package mortal.game.view.drugBack
{
    import Message.Public.*;
    import mortal.component.gconst.*;

    public class DrugPackCache extends Object
    {
        private var _liftData:DrugItemData;
        private var _manaData:DrugItemData;
        private var _petLiftData:DrugItemData;

        public function DrugPackCache()
        {
            return;
        }// end function

        public function getDataBuyType(param1:int) : DrugItemData
        {
            switch(param1)
            {
                case 2:
                {
                    return this.liftData;
                }
                case 3:
                {
                    return this.manaData;
                }
                case 13:
                {
                    return this.petLiftData;
                }
                default:
                {
                    return null;
                    break;
                }
            }
        }// end function

        public function get liftData() : DrugItemData
        {
            if (this._liftData == null)
            {
                this._liftData = new DrugItemData();
            }
            return this._liftData;
        }// end function

        public function get manaData() : DrugItemData
        {
            if (this._manaData == null)
            {
                this._manaData = new DrugItemData();
            }
            return this._manaData;
        }// end function

        public function get petLiftData() : DrugItemData
        {
            if (this._petLiftData == null)
            {
                this._petLiftData = new DrugItemData();
            }
            return this._petLiftData;
        }// end function

        public function getMaxDrugBagAmountByType(param1:int) : int
        {
            var _loc_2:int = 0;
            switch(param1)
            {
                case EDrug._EDrugLifeBag:
                {
                    _loc_2 = GameConst.DrugBagMaxLife;
                    break;
                }
                case EDrug._EDrugManaBag:
                {
                    _loc_2 = GameConst.DrugBagMaxMana;
                    break;
                }
                case EDrug._EDrugPetLifeBag:
                {
                    _loc_2 = GameConst.DrugBagMaxPetLife;
                    break;
                }
                default:
                {
                    break;
                }
            }
            return _loc_2;
        }// end function

    }
}
